home *** CD-ROM | disk | FTP | other *** search
- diff -u xanim2693/Imakefile qt/Imakefile
- --- xanim2693/Imakefile Tue Aug 2 06:30:27 1994
- +++ qt/Imakefile Fri Aug 12 09:59:10 1994
- @@ -18,7 +18,7 @@
- XCOMM
- XCOMM (((((Status changed to RECOMMENDED)))).
- XCOMM
- -XA_AUDIO_DEFS = -DXA_SPARC_AUDIO -DXA_AUDIO_ITIMER
- +XCOMM XA_AUDIO_DEFS = -DXA_SPARC_AUDIO -DXA_AUDIO_ITIMER
- XCOMM
- XCOMM -- SPARC Workstations Solaris
- XCOMM XA_AUDIO_DEFS = -DXA_SPARC_AUDIO -DXA_AUDIO_ITIMER -DSOLARIS
- diff -u xanim2693/xanim.c qt/xanim.c
- --- xanim2693/xanim.c Tue Aug 2 06:30:25 1994
- +++ qt/xanim.c Thu Aug 11 07:50:06 1994
- @@ -207,6 +207,7 @@
- }
- #endif
-
- +int ppmdump= 0, audump= 0, rawdump= 0;
-
- /*
- * Global X11 display configuation variables
- @@ -862,6 +863,23 @@
- {
- LONG len,opt_on;
-
- + if (!strcmp(argv[i]+1,"au")) {
- + xa_audio_enable= TRUE;
- + audump= 1;
- + continue;
- + }
- + if (!strcmp(argv[i]+1,"raw")) {
- + xa_audio_enable= TRUE;
- + rawdump= 1;
- + continue;
- + }
- + if (!strcmp(argv[i]+1,"ppm")) {
- + xa_buffer_flag = TRUE; cmap_true_to_1st = FALSE;
- + cmap_true_to_gray = FALSE; cmap_true_to_332 = FALSE;
- + cmap_true_to_all = TRUE; cmap_true_map_flag = TRUE;
- + ppmdump= 1;
- + continue;
- + }
- if (in[0] == '-') opt_on = FALSE;
- else opt_on = TRUE;
- /* if + turns off then reverse opt_on */
- diff -u xanim2693/xanim.h qt/xanim.h
- --- xanim2693/xanim.h Tue Aug 2 06:30:25 1994
- +++ qt/xanim.h Thu Aug 11 08:22:07 1994
- @@ -89,6 +89,8 @@
- #define XA_X11_TRUE 0x08
- #define XA_X11_COLOR 0x10
-
- +extern int ppmdump, audump, rawdump;
- +
- extern LONG x11_depth;
- extern LONG x11_class;
- extern LONG x11_bytes_pixel;
- diff -u xanim2693/xanim_audio.c qt/xanim_audio.c
- --- xanim2693/xanim_audio.c Tue Aug 2 06:30:25 1994
- +++ qt/xanim_audio.c Thu Aug 11 08:13:08 1994
- @@ -1356,6 +1356,8 @@
- }
- }
-
- + if (audump) xa_audio_hard_type = XA_AUDIO_SUN_AU;
- +
- /* Figure out which conversion routine to use */
- switch(xa_audio_hard_type)
- {
- diff -u xanim2693/xanim_cmap.c qt/xanim_cmap.c
- --- xanim2693/xanim_cmap.c Tue Aug 2 06:30:26 1994
- +++ qt/xanim_cmap.c Thu Aug 11 08:15:13 1994
- @@ -1103,6 +1103,25 @@
- XA_CHDR *new_chdr;
- ULONG *clist,clist_len,wanted_csize;
- register ULONG i,rshift,gshift,bshift;
- + FILE *fdump;
- + char dname[20];
- + static int di= 0;
- +
- + if (ppmdump) {
- + if (di>10) {
- + sprintf(dname,"dump_%d.ppm",di-10);
- + while (fdump= fopen(dname,"r")) fclose(fdump);
- + }
- + sprintf(dname,"dump_%d.ppm",di++);
- + fprintf(stderr,"%s\n",dname);
- + fdump= fopen(dname,"wb");
- + if (fdump) {
- + fprintf(fdump,"P6\n%01d %01d\n%01d\n",width,height,255);
- + fwrite(ipic,1,width*height*3,fdump);
- + fclose(fdump);
- + return;
- + }
- + }
-
- /* NOTE: should make sure 2^(rbits+gbits+bbits) is < (width*height) */
- /* optimize for space if so */
- diff -u xanim2693/xanim_qt.c qt/xanim_qt.c
- --- xanim2693/xanim_qt.c Tue Aug 2 06:30:26 1994
- +++ qt/xanim_qt.c Fri Aug 12 10:08:57 1994
- @@ -1,4 +1,3 @@
- -
- /*
- * xanim_qt.c
- *
- @@ -303,9 +302,17 @@
- }
- } else strcpy(qt_dfilename,qt_rfilename); /* r file is d file */
- DEBUG_LEVEL1 fprintf(stderr,"reading data\n");
- - QT_Read_Video_Data(fin,anim_hdr);
- - QT_Read_Audio_Data(fin,anim_hdr);
- +
- + if ((!rawdump && !audump) || ppmdump) {
- + fprintf(stderr,"reading video data\n");
- + QT_Read_Video_Data(fin,anim_hdr);
- + }
- + if (!ppmdump || rawdump || audump) {
- + fprintf(stderr,"reading audio data\n");
- + QT_Read_Audio_Data(fin,anim_hdr);
- + }
- fclose(fin);
- + if (ppmdump || rawdump || audump) exit(0);
-
- if (xa_verbose) fprintf(stderr," Frames %ld\n", qt_frame_cnt);
-
- @@ -1479,15 +1486,17 @@
- else if ( (cmap_true_to_gray == TRUE) && (qt_chdr == 0) )
- qt_chdr = CMAP_Create_Gray(qt_cmap,&qt_imagec);
-
- - if (cmap_dither_type == CMAP_DITHER_FLOYD)
- - tpic = UTIL_RGB_To_FS_Map(0,qt_pic,qt_chdr,
- - qt_imagex,qt_imagey,FALSE);
- - else
- - tpic = UTIL_RGB_To_Map(0,qt_pic,qt_chdr,
- - qt_imagex,qt_imagey,FALSE);
- - ACT_Setup_Mapped(act,tpic,qt_chdr,xpos,ypos,xsize,ysize,
- + if (!ppmdump) {
- + if (cmap_dither_type == CMAP_DITHER_FLOYD)
- + tpic = UTIL_RGB_To_FS_Map(0,qt_pic,qt_chdr,
- + qt_imagex,qt_imagey,FALSE);
- + else
- + tpic = UTIL_RGB_To_Map(0,qt_pic,qt_chdr,
- + qt_imagex,qt_imagey,FALSE);
- + ACT_Setup_Mapped(act,tpic,qt_chdr,xpos,ypos,xsize,ysize,
- qt_imagex,qt_imagey,FALSE,0,TRUE,TRUE,FALSE);
- - ACT_Add_CHDR_To_Action(act,qt_chdr);
- + ACT_Add_CHDR_To_Action(act,qt_chdr);
- + } /* end of not ppmdump */
- } /* end of not NOP */
- } /* end of true_map */
- } /* end of buffer */
- @@ -3557,6 +3566,7 @@
- ULONG ret,base_offset,i;
- ULONG cur_s2chunk,nxt_s2chunk;
- ULONG tag;
- + FILE *fau= 0;
-
- DEBUG_LEVEL1 fprintf(stderr,"QT_Read_Audio: attempt %lx co# %ld\n",
- qt_audio_attempt,qts_chunkoff_num);
- @@ -3595,6 +3605,21 @@
- qt_audio_type = qts_codecs[tag].compression;
- qt_audio_end = 1;
-
- + if (audump || rawdump) {
- + fprintf(stderr,"Sample Rate: %01u, Channels: %01d, BitsPerSample: %01d\n"
- + ,qt_audio_freq, qt_audio_chans, qt_audio_bps <<3);
- + if (rawdump) {
- + fau= fopen("xanim.raw","wb");
- + if (fau) fprintf(stderr,"Opened xanim.raw\n");
- + else exit(1);
- + }
- + if (audump) {
- + fau= fopen("xanim.au","wb");
- + if (fau) fprintf(stderr,"Opened xanim.au\n");
- + else exit(1);
- + }
- + }
- +
- /* Loop through chunk offsets */
- for(i=0; i < qts_chunkoff_num; i++)
- { UBYTE *snd_data;
- @@ -3640,9 +3665,16 @@
- snd_data = (UBYTE *)malloc(snd_size);
- if (snd_data==0) TheEnd1("QT aud_dat: malloc err");
- ret = fread(snd_data, snd_size, 1, fin);
- + if (rawdump) fwrite(snd_data, 1, snd_size, fau);
- if (ret != 1) { fprintf(stderr,"QT: snd rd err\n"); return; }
- - XA_Add_Sound(anim_hdr,snd_data,qt_audio_type, 0, qt_audio_freq,snd_size);
- +/* XA_Add_Sound(anim_hdr,snd_data,qt_audio_type, 0, qt_audio_freq,snd_size);
- + if (audump) {
- + anim_hdr->last_snd->delta(anim_hdr->last_snd,snd_data);
- + fwrite(snd_data, 1, snd_size, fau);
- + } */
- } /* end of chunk_offset loop */
- + if (fau) { fclose(fau); fau= 0; }
- + if (fau) fprintf(stderr,"\nWrote all Sound chunks\n");
- }
-
-